Optimal. Leaf size=158 \[ -\frac {2 d \log \left (\cosh \left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right )\right )}{3 a^2 f^2}+\frac {d \text {sech}^2\left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right )}{6 a^2 f^2}+\frac {(c+d x) \tanh \left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right )}{3 a^2 f}+\frac {(c+d x) \text {sech}^2\left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right ) \tanh \left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right )}{6 a^2 f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.08, antiderivative size = 158, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3399, 4270,
4269, 3556} \begin {gather*} \frac {(c+d x) \tanh \left (\frac {e}{2}+\frac {f x}{2}+\frac {i \pi }{4}\right )}{3 a^2 f}+\frac {(c+d x) \tanh \left (\frac {e}{2}+\frac {f x}{2}+\frac {i \pi }{4}\right ) \text {sech}^2\left (\frac {e}{2}+\frac {f x}{2}+\frac {i \pi }{4}\right )}{6 a^2 f}+\frac {d \text {sech}^2\left (\frac {e}{2}+\frac {f x}{2}+\frac {i \pi }{4}\right )}{6 a^2 f^2}-\frac {2 d \log \left (\cosh \left (\frac {e}{2}+\frac {f x}{2}+\frac {i \pi }{4}\right )\right )}{3 a^2 f^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3399
Rule 3556
Rule 4269
Rule 4270
Rubi steps
\begin {align*} \int \frac {c+d x}{(a+i a \sinh (e+f x))^2} \, dx &=\frac {\int (c+d x) \csc ^4\left (\frac {1}{2} \left (i e+\frac {\pi }{2}\right )+\frac {i f x}{2}\right ) \, dx}{4 a^2}\\ &=\frac {d \text {sech}^2\left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right )}{6 a^2 f^2}+\frac {(c+d x) \text {sech}^2\left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right ) \tanh \left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right )}{6 a^2 f}-\frac {\int (c+d x) \text {csch}^2\left (\frac {e}{2}-\frac {i \pi }{4}+\frac {f x}{2}\right ) \, dx}{6 a^2}\\ &=\frac {d \text {sech}^2\left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right )}{6 a^2 f^2}+\frac {(c+d x) \tanh \left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right )}{3 a^2 f}+\frac {(c+d x) \text {sech}^2\left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right ) \tanh \left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right )}{6 a^2 f}-\frac {d \int \coth \left (\frac {e}{2}-\frac {i \pi }{4}+\frac {f x}{2}\right ) \, dx}{3 a^2 f}\\ &=-\frac {2 d \log \left (\cosh \left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right )\right )}{3 a^2 f^2}+\frac {d \text {sech}^2\left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right )}{6 a^2 f^2}+\frac {(c+d x) \tanh \left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right )}{3 a^2 f}+\frac {(c+d x) \text {sech}^2\left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right ) \tanh \left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right )}{6 a^2 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.68, size = 241, normalized size = 1.53 \begin {gather*} \frac {\left (-i \cosh \left (\frac {1}{2} (e+f x)\right )+\sinh \left (\frac {1}{2} (e+f x)\right )\right ) \left (d \cosh \left (\frac {1}{2} (e+f x)\right ) \left (-2 i+3 e+3 f x-6 \text {ArcTan}\left (\tanh \left (\frac {1}{2} (e+f x)\right )\right )+3 i \log (\cosh (e+f x))\right )+\cosh \left (\frac {3}{2} (e+f x)\right ) \left (-d e+2 c f+d f x+2 d \text {ArcTan}\left (\tanh \left (\frac {1}{2} (e+f x)\right )\right )-i d \log (\cosh (e+f x))\right )+2 i \left (-i d+2 d e-3 c f-d f x-4 d \text {ArcTan}\left (\tanh \left (\frac {1}{2} (e+f x)\right )\right )+d \cosh (e+f x) \left (e+f x-2 \text {ArcTan}\left (\tanh \left (\frac {1}{2} (e+f x)\right )\right )+i \log (\cosh (e+f x))\right )+2 i d \log (\cosh (e+f x))\right ) \sinh \left (\frac {1}{2} (e+f x)\right )\right )}{6 a^2 f^2 (-i+\sinh (e+f x))^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 2.75, size = 113, normalized size = 0.72
method | result | size |
risch | \(\frac {2 d x}{3 f \,a^{2}}+\frac {2 d e}{3 f^{2} a^{2}}-\frac {2 i \left (3 i f d x \,{\mathrm e}^{f x +e}+3 i f c \,{\mathrm e}^{f x +e}-i d \,{\mathrm e}^{f x +e}+d x f +d \,{\mathrm e}^{2 f x +2 e}+c f \right )}{3 \left ({\mathrm e}^{f x +e}-i\right )^{3} f^{2} a^{2}}-\frac {2 d \ln \left ({\mathrm e}^{f x +e}-i\right )}{3 f^{2} a^{2}}\) | \(113\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Both result and optimal contain complex but leaf count of result is larger than
twice the leaf count of optimal. 271 vs. \(2 (115) = 230\).
time = 0.29, size = 271, normalized size = 1.72 \begin {gather*} \frac {2}{3} \, d {\left (\frac {f x e^{\left (3 \, f x + 3 \, e\right )} - {\left (3 i \, f x e^{\left (2 \, e\right )} + i \, e^{\left (2 \, e\right )}\right )} e^{\left (2 \, f x\right )} - e^{\left (f x + e\right )}}{a^{2} f^{2} e^{\left (3 \, f x + 3 \, e\right )} - 3 i \, a^{2} f^{2} e^{\left (2 \, f x + 2 \, e\right )} - 3 \, a^{2} f^{2} e^{\left (f x + e\right )} + i \, a^{2} f^{2}} - \frac {\log \left (-i \, {\left (i \, e^{\left (f x + e\right )} + 1\right )} e^{\left (-e\right )}\right )}{a^{2} f^{2}}\right )} + \frac {2}{3} \, c {\left (\frac {3 \, e^{\left (-f x - e\right )}}{{\left (3 \, a^{2} e^{\left (-f x - e\right )} - 3 i \, a^{2} e^{\left (-2 \, f x - 2 \, e\right )} - a^{2} e^{\left (-3 \, f x - 3 \, e\right )} + i \, a^{2}\right )} f} + \frac {i}{{\left (3 \, a^{2} e^{\left (-f x - e\right )} - 3 i \, a^{2} e^{\left (-2 \, f x - 2 \, e\right )} - a^{2} e^{\left (-3 \, f x - 3 \, e\right )} + i \, a^{2}\right )} f}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.38, size = 170, normalized size = 1.08 \begin {gather*} \frac {2 \, {\left (d f x e^{\left (3 \, f x + 3 \, e\right )} - i \, c f - {\left (3 i \, d f x + i \, d\right )} e^{\left (2 \, f x + 2 \, e\right )} + {\left (3 \, c f - d\right )} e^{\left (f x + e\right )} - {\left (d e^{\left (3 \, f x + 3 \, e\right )} - 3 i \, d e^{\left (2 \, f x + 2 \, e\right )} - 3 \, d e^{\left (f x + e\right )} + i \, d\right )} \log \left (e^{\left (f x + e\right )} - i\right )\right )}}{3 \, {\left (a^{2} f^{2} e^{\left (3 \, f x + 3 \, e\right )} - 3 i \, a^{2} f^{2} e^{\left (2 \, f x + 2 \, e\right )} - 3 \, a^{2} f^{2} e^{\left (f x + e\right )} + i \, a^{2} f^{2}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.28, size = 167, normalized size = 1.06 \begin {gather*} \frac {- 2 i c f - 2 i d f x - 2 i d e^{2 e} e^{2 f x} + \left (6 c f e^{e} + 6 d f x e^{e} - 2 d e^{e}\right ) e^{f x}}{3 a^{2} f^{2} e^{3 e} e^{3 f x} - 9 i a^{2} f^{2} e^{2 e} e^{2 f x} - 9 a^{2} f^{2} e^{e} e^{f x} + 3 i a^{2} f^{2}} + \frac {2 d x}{3 a^{2} f} - \frac {2 d \log {\left (e^{f x} - i e^{- e} \right )}}{3 a^{2} f^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.44, size = 195, normalized size = 1.23 \begin {gather*} \frac {2 \, {\left (d f x e^{\left (3 \, f x + 3 \, e\right )} - 3 i \, d f x e^{\left (2 \, f x + 2 \, e\right )} + 3 \, c f e^{\left (f x + e\right )} - d e^{\left (3 \, f x + 3 \, e\right )} \log \left (e^{\left (f x + e\right )} - i\right ) + 3 i \, d e^{\left (2 \, f x + 2 \, e\right )} \log \left (e^{\left (f x + e\right )} - i\right ) + 3 \, d e^{\left (f x + e\right )} \log \left (e^{\left (f x + e\right )} - i\right ) - i \, c f - i \, d e^{\left (2 \, f x + 2 \, e\right )} - d e^{\left (f x + e\right )} - i \, d \log \left (e^{\left (f x + e\right )} - i\right )\right )}}{3 \, {\left (a^{2} f^{2} e^{\left (3 \, f x + 3 \, e\right )} - 3 i \, a^{2} f^{2} e^{\left (2 \, f x + 2 \, e\right )} - 3 \, a^{2} f^{2} e^{\left (f x + e\right )} + i \, a^{2} f^{2}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.54, size = 160, normalized size = 1.01 \begin {gather*} -\frac {\frac {2\,d\,\ln \left ({\mathrm {e}}^{f\,x}\,{\mathrm {e}}^e-\mathrm {i}\right )}{3}+{\mathrm {e}}^{e+f\,x}\,\left (-\frac {d\,2{}\mathrm {i}}{3}+c\,f\,2{}\mathrm {i}+d\,\ln \left ({\mathrm {e}}^{f\,x}\,{\mathrm {e}}^e-\mathrm {i}\right )\,2{}\mathrm {i}\right )+\frac {2\,d\,{\mathrm {e}}^{2\,e+2\,f\,x}}{3}+f\,\left (\frac {2\,c}{3}+2\,d\,x\,{\mathrm {e}}^{2\,e+2\,f\,x}+\frac {d\,x\,{\mathrm {e}}^{3\,e+3\,f\,x}\,2{}\mathrm {i}}{3}\right )-2\,d\,{\mathrm {e}}^{2\,e+2\,f\,x}\,\ln \left ({\mathrm {e}}^{f\,x}\,{\mathrm {e}}^e-\mathrm {i}\right )-\frac {d\,{\mathrm {e}}^{3\,e+3\,f\,x}\,\ln \left ({\mathrm {e}}^{f\,x}\,{\mathrm {e}}^e-\mathrm {i}\right )\,2{}\mathrm {i}}{3}}{a^2\,f^2\,{\left (1+{\mathrm {e}}^{e+f\,x}\,1{}\mathrm {i}\right )}^3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________